import { ref } from "vue";
import userInteraction from '../types/userInteractionFun'
export default function userInteractionFun(emit:Function):userInteraction{
    const imageDialog = ref<boolean>(false)
    const maskShow = ref<boolean>(false)

    const chooseImage = function(){
        imageDialog.value = true
    }

    const mouseenterHandler = function(){
        maskShow.value = true
    }

    const mouseleaveHandler = function(){
        maskShow.value = false
    }

    const clearImg = function(){
        emit('update:imgUrl','')
    }
    return {
        imageDialog,
        maskShow,
        chooseImage,
        mouseenterHandler,
        mouseleaveHandler,
        clearImg
    } 
}